SIP2-309: Fix doPinCheck failing when FOLIO returns 200 without Content-Type header - #255
Merged
Conversation
…thout Content-Type header
zakletskyi-epam
force-pushed
the
SIP2-309
branch
from
June 26, 2026 12:22
a25bca2 to
14324d1
Compare
pfilippov-epam
approved these changes
Jun 30, 2026
mukhiddin-yusuf
approved these changes
Jun 30, 2026
# Conflicts: # NEWS.md
# Conflicts: # NEWS.md # src/test/java/org/folio/edge/sip2/api/PatronInformationIT.java
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Purpose
After the Vert.x 5 migration, doPinCheck incorrectly inherited a Content-Type response header check via the shared getHttpRequestExpectations helper. The /patron-pin/verify endpoint returns 200 OK without a Content-Type header, causing SIP2 patron PIN verification to fail.
Approach
Restored the pre-migration behavior of doPinCheck — status-only check (SC_SUCCESS) without Content-Type validation, since the response body is not used. Updated the WireMock stub to reflect real FOLIO behavior (200 without Content-Type). Added two tests: a unit test reproducing the bug with a mocked 200 response without Content-Type, and a real embedded HTTP server test confirming end-to-end correctness.
Changes Checklist
Related Issues
SIP2-309
Learning and Resources (if applicable)
Discuss any research conducted during the development of this pull request. Include links to relevant blog posts, patterns, libraries, or addons that were used to solve the problem.
Screenshots (if applicable)
If this pull request involves any visual changes or new features, consider including screenshots or GIFs to illustrate the changes.